﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using KPIS.GERP.GIMS.MODEL;
using KPIS.GERP.GIMS.IBLL;
using KPIS.GERP.GIMS.IDAL;
using KPIS.GERP.GIMS.DALFactory;
using Telerik.Web.UI;

namespace KPIS.GERP.GIMS.BLL
{
    public class ResourceMasterTypeBLL : IBLLResourceMasterType
    {
        private static readonly IDALResourceMasterType dal = DataAccess.CreateResourceMasterType();

        public ResourceMasterTypeBLL()
        {

        }

        public IList<ResourceMasterTypeInfo> GetResourceMasterType()
        {
            return dal.GetResourceMasterType();
        }

        public IList<ResourceMasterTypeInfo> GetResourceMasterType(string record_status)
        {
            return dal.GetResourceMasterType(record_status);
        }

        public ResourceMasterTypeInfo GetResourceMasterType(int seq)
        {
            return dal.GetResourceMasterType(seq);
        }

        public void Insert(ResourceMasterTypeInfo info)
        {
            try
            {
                dal.Insert(info);
            }
            catch
            {
                throw;
            }
        }

        public void Update(ResourceMasterTypeInfo info)
        {
            try
            {
                dal.Update(info);
            }
            catch
            {
                throw;
            }
        }

        public void Delete(ResourceMasterTypeInfo info)
        {
            try
            {
                dal.Delete(info);
            }
            catch
            {
                throw;
            }
        }

        public void DeleteAll(IList<ResourceMasterTypeInfo> infoList)
        {
            try
            {
                dal.DeleteAll(infoList);
            }
            catch
            {
                throw;
            }
        }

        public void DeleteFromDB(IList<ResourceMasterTypeInfo> infoList)
        {
            try
            {
                dal.DeleteFromDB(infoList);
            }
            catch
            {
                throw;
            }
        }

        public void Restore(IList<ResourceMasterTypeInfo> infoList)
        {
            try
            {
                dal.Restore(infoList);
            }
            catch
            {
                throw;
            }
        }
    }
}
